//
//  RadioButtonGroup.h
//  vImageStudy
//
//  Created by Evan Xie on 8/7/15.
//  Copyright (c) 2015 Family Wings. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RadioButton.h"


@class RadioButtonGroup;
@protocol RadioButtonGroupDelegate <NSObject>
@optional
- (void)radioButtonGroup:(RadioButtonGroup *)group didSelectAtIndex:(NSInteger)buttonIndex;
@end

@interface RadioButtonGroup : NSObject

@property (nonatomic, weak) id <RadioButtonGroupDelegate> delegate;

@property (nonatomic, readonly) NSArray *radioButtons;

@property (nonatomic, assign) NSInteger selectedIndex;

- (instancetype)initWithRadioButtons:(NSArray *)radioButtons;

- (void)addRadioButton:(RadioButton *)radioButton;
- (void)addRadioButtons:(NSArray *)radioButtons;

- (void)selectRadioButton:(RadioButton *)radioButton;

@end
